/*
 * Copyright (C) 2012  Romain DUBOIS
 * 
 * This file is part of NeMoS - Network and Modular Software
 * 
 * NeMoS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * NeMoS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with NeMoS.  If not, see <http://www.gnu.org/licenses/>.
 */
package nemos.util.i18n;

import java.util.Locale;

/**
 * ITranslator : The translator interface.
 * 
 * @author Romain DUBOIS
 */
public interface ITranslator {

    /**
     * Get the label in the current locale formatted with the specified
     * parameters.
     * 
     * @param pKey
     *            The label key
     * @param pParams
     *            The label parameters
     * @return The formatted label
     */
    String getLabel(String pKey, Object... pParams);

    /**
     * Translate the label formatted with the specified parameters.
     * 
     * @param pKey
     *            The label key
     * @param pLocale
     *            The target locale
     * @param pParams
     *            The label parameters
     * @return The formatted label
     */
    String translateLabel(String pKey, Locale pLocale, Object... pParams);

    /**
     * Get the label in the current locale formatted with the specified
     * parameters.
     * 
     * @param pBaseName
     *            The text base name (=category)
     * @param pKey
     *            The label key
     * @param pParams
     *            The label parameters
     * @return The formatted label
     */
    String getText(String pBaseName, String pKey, Object... pParams);

    /**
     * Translate the label formatted with the specified parameters.
     * 
     * @param pBaseName
     *            The text base name (=category)
     * @param pKey
     *            The label key
     * @param pLocale
     *            The target locale
     * @param pParams
     *            The label parameters
     * @return The formatted label
     */
    String translateText(String pBaseName, String pKey, Locale pLocale, Object... pParams);
}